<template>
  <div class="home-container">
    <router-view></router-view>
    <van-tabbar
      v-model="active"
      class="footer"
      v-if="$route.meta.needTab"
      route
    >
      <van-tabbar-item class="index" icon="home-o" to="/shouye"
        >主页</van-tabbar-item
      >
      <van-tabbar-item class="index" icon="comment-o" to="/question"
        >问答</van-tabbar-item
      >
      <van-tabbar-item class="index" icon="tv-o" to="/av">视频</van-tabbar-item>
      <van-tabbar-item class="index" icon="user-o" to="/my"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>
<script>
export default {
  name: 'home',
  data () {
    return {
      active: 0
    }
  }
}
</script>
<style lang="less" scoped>
.home-container {
  .footer {
    background-color: #fff;
    /deep/ .van-icon {
      font-size: 20px;
    }
    /deep/ .van-tabbar-item__text {
      margin-top: 2px;
      font-size: 12px;
    }
  }
}
</style>
